package com.dobest.studentmanagement.web;

import com.dobest.studentmanagement.domain.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Package: com.dobest.studentmanagement.web
 * @author: Jounghu
 * @date: 2018/8/19 11:19
 * @version: V1.0
 */
@Controller
public class PageController {


    @GetMapping(value = {"/index","/"})
    public ModelAndView indexPage(ModelAndView modelAndView) {
        modelAndView.addObject("stu",new Student());
        modelAndView.setViewName("index");
        return modelAndView;
    }

    @GetMapping("/login")
    public String loginPage(){
        return "login";
    }



}
